|
sgdk
|
String manipulations. More...
Go to the source code of this file.
Functions | |
| u32 | strlen (const char *str) |
| Calculate the length of a string. | |
| s16 | strcmp (const char *str1, const char *str2) |
| Compare the 2 strings. | |
| char * | strclr (char *str) |
| Clear a string. | |
| char * | strcpy (char *dest, const char *src) |
| Copy a string. | |
| char * | strcat (char *dest, const char *src) |
| Concatenate two strings. | |
| void | intToStr (s32 value, char *str, s16 minsize) |
| Convert a s32 value to string. | |
| void | uintToStr (u32 value, char *str, s16 minsize) |
| Convert a u32 value to string. | |
| void | intToHex (u32 value, char *str, s16 minsize) |
| Convert a u32 value to hexadecimal string. | |
| void | fix32ToStr (fix32 value, char *str, s16 numdec) |
| Convert a fix32 value to string. | |
| void | fix16ToStr (fix16 value, char *str, s16 numdec) |
| Convert a fix16 value to string. | |
String manipulations.
This unit provides basic null terminated string operations and type conversions.
| void fix16ToStr | ( | fix16 | value, |
| char * | str, | ||
| s16 | numdec | ||
| ) |
Convert a fix16 value to string.
| value | The fix16 value to convert to string. |
| str | Destination string (it must be large enough to receive result). |
| numdec | Number of wanted decimal. |
Converts the specified fix16 value to string.
| void fix32ToStr | ( | fix32 | value, |
| char * | str, | ||
| s16 | numdec | ||
| ) |
Convert a fix32 value to string.
| value | The fix32 value to convert to string. |
| str | Destination string (it must be large enough to receive result). |
| numdec | Number of wanted decimal. |
Converts the specified fix32 value to string.
| void intToHex | ( | u32 | value, |
| char * | str, | ||
| s16 | minsize | ||
| ) |
Convert a u32 value to hexadecimal string.
| value | The u32 integer value to convert to hexadecimal string. |
| str | Destination string (it must be large enough to receive result). |
| minsize | Minimum size of resulting string. |
Converts the specified u32 value to hexadecimal string.
If resulting value is shorter than requested minsize the method prepends result with '0' character.
| void intToStr | ( | s32 | value, |
| char * | str, | ||
| s16 | minsize | ||
| ) |
Convert a s32 value to string.
| value | The s32 integer value to convert to string. |
| str | Destination string (it must be large enough to receive result). |
| minsize | Minimum size of resulting string. |
Converts the specified s32 value to string.
If resulting value is shorter than requested minsize the method prepends result with '0' character.
| char* strcat | ( | char * | dest, |
| const char * | src | ||
| ) |
Concatenate two strings.
| dest | Destination string (it must be large enough to receive appending). |
| src | Source string. |
Appends the source string to the destination string.
| char* strclr | ( | char * | str | ) |
Clear a string.
| str | string to clear. |
Clear the specified string.
| s16 strcmp | ( | const char * | str1, |
| const char * | str2 | ||
| ) |
Compare the 2 strings.
| str1 | The string we want to compare. |
| str2 | The string we want to compare. |
This function starts comparing the first character of each string.
If they are equal to each other, it continues with the following pairs until the characters differ or until a terminating null-character is reached.
| char* strcpy | ( | char * | dest, |
| const char * | src | ||
| ) |
Copy a string.
| dest | Destination string (it must be large enough to receive the copy). |
| src | Source string. |
Copies the source string to destination.
| u32 strlen | ( | const char * | str | ) |
Calculate the length of a string.
| str | The string we want to calculate the length. |
This function calculates and returns the length of the specified string.
| void uintToStr | ( | u32 | value, |
| char * | str, | ||
| s16 | minsize | ||
| ) |
Convert a u32 value to string.
| value | The u32 integer value to convert to string. |
| str | Destination string (it must be large enough to receive result). |
| minsize | Minimum size of resulting string. |
Converts the specified u32 value to string.
If resulting value is shorter than requested minsize the method prepends result with '0' character.